package com.chainwintel.prjmgmt.service;

import java.util.List;
import java.util.Set;

import org.springframework.dao.DataAccessException;

import com.chainwintel.prjmgmt.model.MenuItem;
import com.chainwintel.prjmgmt.model.User;
import com.chainwintel.prjmgmt.repository.GenericRepository;

public interface UserMgr extends GenericRepository<User> {
	
	User findByUsernameAndPassword(String username, String password)  throws DataAccessException;
	
	User find(long id)  throws DataAccessException ;

	List<User> listUsers() throws DataAccessException;

	void assignOpers(MenuItem menuItem, User target) throws DataAccessException;

	Set<MenuItem> loadMenu(User user)throws DataAccessException;

}
